// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SYS_ATTACHMENT
// * CreateDate    : 2014-06-05 18:30:42
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:42
// * LastChanger   : 2014-06-05 18:30:42
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SysAttachmentEntity : EntityBase
    {
        public SysAttachmentTable TableSchema
        {
            get
            {
                return SysAttachmentTable.Current;
            }
		}
		
		public SysAttachmentEntity()
        {

        }
		
		public SysAttachmentEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
			this.RowId = Convert.ToString(CommonFunctions.ToObject(dr["ROW_ID"]));
			this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
			this.FilePath = Convert.ToString(CommonFunctions.ToObject(dr["FILE_PATH"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.UploadBy = Convert.ToString(CommonFunctions.ToObject(dr["UPLOAD_BY"]));
			this.UploadTime = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPLOAD_TIME"]));
        }
		
		public SysAttachmentEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
			this.RowId = Convert.ToString(CommonFunctions.ToObject(dr["ROW_ID"]));
			this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
			this.FilePath = Convert.ToString(CommonFunctions.ToObject(dr["FILE_PATH"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.UploadBy = Convert.ToString(CommonFunctions.ToObject(dr["UPLOAD_BY"]));
			this.UploadTime = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPLOAD_TIME"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SysAttachmentTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SysAttachmentTable.C_ID)); }
            set { SetData(SysAttachmentTable.C_ID, value); }
        }
		
        [DataMember]
        public string FormName
        {
            get { return Convert.ToString(GetData(SysAttachmentTable.C_FORM_NAME)); }
            set { SetData(SysAttachmentTable.C_FORM_NAME, value); }
        }
		
        [DataMember]
        public string RowId
        {
            get { return Convert.ToString(GetData(SysAttachmentTable.C_ROW_ID)); }
            set { SetData(SysAttachmentTable.C_ROW_ID, value); }
        }
		
        [DataMember]
        public string FileName
        {
            get { return Convert.ToString(GetData(SysAttachmentTable.C_FILE_NAME)); }
            set { SetData(SysAttachmentTable.C_FILE_NAME, value); }
        }
		
        [DataMember]
        public string FilePath
        {
            get { return Convert.ToString(GetData(SysAttachmentTable.C_FILE_PATH)); }
            set { SetData(SysAttachmentTable.C_FILE_PATH, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(SysAttachmentTable.C_REMARK)); }
            set { SetData(SysAttachmentTable.C_REMARK, value); }
        }
		
        [DataMember]
        public string UploadBy
        {
            get { return Convert.ToString(GetData(SysAttachmentTable.C_UPLOAD_BY)); }
            set { SetData(SysAttachmentTable.C_UPLOAD_BY, value); }
        }
		
        [DataMember]
        public DateTime UploadTime
        {
            get { return Convert.ToDateTime(GetData(SysAttachmentTable.C_UPLOAD_TIME)); }
            set { SetData(SysAttachmentTable.C_UPLOAD_TIME, value); }
        }
		
		#endregion
	}
	
	
}	

